﻿<Activity mc:Ignorable="sads sap" x:Class="TfsCloudDeploy.Workflow.Core.Activities.Xaml.UpdateAssemblyMetadata" this:UpdateAssemblyMetadata.FileSpec="AssemblyInfo.*" this:UpdateAssemblyMetadata.WriteVersionTextFile="False" this:UpdateAssemblyMetadata.VersionTextFileName="__VersionStamp.txt" this:UpdateAssemblyMetadata.VersionNumberRegularExpression="\d+\.\d+\.\d+\.\d+"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:local="clr-namespace:TfsCloudDeploy.Workflow.Core.Activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common"
 xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
 xmlns:mtbc1="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client"
 xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:s1="clr-namespace:System;assembly=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
 xmlns:s2="clr-namespace:System;assembly=System"
 xmlns:s3="clr-namespace:System;assembly=System.Xml"
 xmlns:s4="clr-namespace:System;assembly=System.Core"
 xmlns:s5="clr-namespace:System;assembly=System.ServiceModel"
 xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
 xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System"
 xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel"
 xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=System.Core"
 xmlns:scg4="clr-namespace:System.Collections.Generic;assembly=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
 xmlns:sd="clr-namespace:System.Data;assembly=System.Data"
 xmlns:sd1="clr-namespace:System.Data;assembly=System.Data.DataSetExtensions"
 xmlns:si="clr-namespace:System.IO;assembly=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
 xmlns:si1="clr-namespace:System.IO;assembly=mscorlib"
 xmlns:si2="clr-namespace:System.IO;assembly=System.Core"
 xmlns:si3="clr-namespace:System.IO;assembly=System"
 xmlns:si4="clr-namespace:System.IO;assembly=System.ServiceModel"
 xmlns:si5="clr-namespace:System.IO;assembly=WindowsBase"
 xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
 xmlns:sl1="clr-namespace:System.Linq;assembly=System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
 xmlns:sr="clr-namespace:System.Reflection;assembly=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
 xmlns:st="clr-namespace:System.Text;assembly=mscorlib"
 xmlns:str="clr-namespace:System.Text.RegularExpressions;assembly=System"
 xmlns:str1="clr-namespace:System.Text.RegularExpressions;assembly=System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
 xmlns:this="clr-namespace:TfsCloudDeploy.Workflow.Core.Activities.Xaml"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="SourcesDirectory" Type="InArgument(x:String)" />
    <x:Property Name="FileSpec" Type="InArgument(x:String)" />
    <x:Property Name="VersionNumber" Type="OutArgument(x:String)" />
    <x:Property Name="AssemblyInfoMetadata" Type="InArgument(s:String[])" />
    <x:Property Name="WriteVersionTextFile" Type="InArgument(x:Boolean)" />
    <x:Property Name="VersionTextFileName" Type="InArgument(x:String)" />
    <x:Property Name="VersionNumberRegularExpression" Type="InArgument(x:String)" />
    <x:Property Name="BinariesDirectory" Type="InArgument(x:String)" />
    <x:Property Name="BuildVersionNumber" Type="InArgument(x:String)" />
  </x:Members>
  <this:UpdateAssemblyMetadata.BuildVersionNumber>
    <InArgument x:TypeArguments="x:String">
      <Literal x:TypeArguments="x:String" Value="" />
    </InArgument>
  </this:UpdateAssemblyMetadata.BuildVersionNumber>
  <sap:VirtualizedContainerService.HintSize>673,4718</sap:VirtualizedContainerService.HintSize>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
  <Sequence DisplayName="Update Version Info" sad:XamlDebuggerXmlReader.FileName="F:\CodePlex\TfsCloudDeploy\Dev\TfsCloudDeploy\Workflow.Core\Activities\UpdateAssemblyMetadata.xaml" sap:VirtualizedContainerService.HintSize="633,4678" mtbwt:BuildTrackingParticipant.Importance="None" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
    <Sequence.Variables>
      <Variable x:TypeArguments="mtbc1:IBuildDetail" Name="BuildDetail" />
      <Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="MatchingFiles" />
      <Variable x:TypeArguments="x:String" Name="FileSpecToMatch" />
      <Variable x:TypeArguments="scg:List(x:String)" Default="[New List(Of String)]" Name="AssemblyInfoMetadataList" />
    </Sequence.Variables>
    <sap:WorkflowViewStateService.ViewState>
      <scg:Dictionary x:TypeArguments="x:String, x:Object">
        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
      </scg:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <Sequence DisplayName="Validate Arguments" sap:VirtualizedContainerService.HintSize="611,1076" mtbwt:BuildTrackingParticipant.Importance="Low">
      <sap:WorkflowViewStateService.ViewState>
        <scg:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          <x:Boolean x:Key="IsPinned">False</x:Boolean>
        </scg:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <If Condition="[String.IsNullOrEmpty(SourcesDirectory) Or (Not Directory.Exists(SourcesDirectory))]" DisplayName="Validate SourcesDirectory" sap:VirtualizedContainerService.HintSize="464,208" mtbwt:BuildTrackingParticipant.Importance="Low">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Throw DisplayName="Throw ArgumentException" Exception="[New ArgumentException(&quot;Please specify a valid sources directory to search for matching files.&quot;, &quot;SourcesDirectory&quot;)]" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" />
        </If.Then>
      </If>
      <If Condition="[String.IsNullOrEmpty(FileSpec)]" DisplayName="Validate FileSpec" sap:VirtualizedContainerService.HintSize="464,208" mtbwt:BuildTrackingParticipant.Importance="Low">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Throw DisplayName="Throw ArgumentException" Exception="[New ArgumentException(&quot;Please specify the file specification to search for.&quot;, &quot;FileSpec&quot;)]" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" />
        </If.Then>
      </If>
      <If Condition="[String.IsNullOrEmpty(VersionNumberRegularExpression)]" DisplayName="Validate VersionNumberRegularExpression" sap:VirtualizedContainerService.HintSize="464,208" mtbwt:BuildTrackingParticipant.Importance="Low">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Throw DisplayName="Throw ArgumentException" Exception="[New ArgumentException(&quot;Please specify the regular expression to search for&quot;, &quot;RegularExpression&quot;)]" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" />
        </If.Then>
      </If>
      <If Condition="[String.IsNullOrEmpty(BuildVersionNumber)]" DisplayName="Validate Build Version Number" sap:VirtualizedContainerService.HintSize="464,208" mtbwt:BuildTrackingParticipant.Importance="Low">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Throw DisplayName="Throw ArgumentException" Exception="[New ArgumentException(&quot;Please specify the Build Version Number string (the build name or any other string containing the embedded version number (e.g.: AllSystemsBuild_1.0.123.0) or simply the version number itself (e.g: 1.0.123.0).&quot;, &quot;BuildVersionNumber&quot;)]" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" />
        </If.Then>
      </If>
    </Sequence>
    <mtbwa:GetBuildDetail DisplayName="Get the Build" sap:VirtualizedContainerService.HintSize="611,22" Result="[BuildDetail]" />
    <Assign DisplayName="Extract Version Info" sap:VirtualizedContainerService.HintSize="611,60" mtbwt:BuildTrackingParticipant.Importance="Low">
      <Assign.To>
        <OutArgument x:TypeArguments="x:String">[VersionNumber]</OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="x:String">[New System.Text.RegularExpressions.Regex(VersionNumberRegularExpression).Match(BuildVersionNumber).Value]</InArgument>
      </Assign.Value>
    </Assign>
    <InvokeMethod sap:VirtualizedContainerService.HintSize="611,132" mtbwt:BuildTrackingParticipant.Importance="Low" MethodName="Add">
      <InvokeMethod.TargetObject>
        <InArgument x:TypeArguments="scg:List(x:String)">[AssemblyInfoMetadataList]</InArgument>
      </InvokeMethod.TargetObject>
      <InArgument x:TypeArguments="x:String">[String.Format("AssemblyFileVersion|""{0}""", VersionNumber)]</InArgument>
    </InvokeMethod>
    <If Condition="[(Not AssemblyInfoMetadata Is Nothing) AndAlso (AssemblyInfoMetadata.Length &gt; 0)]" DisplayName="Append Provided Metadata to List" sap:VirtualizedContainerService.HintSize="611,240" mtbwt:BuildTrackingParticipant.Importance="Low">
      <sap:WorkflowViewStateService.ViewState>
        <scg:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          <x:Boolean x:Key="IsPinned">False</x:Boolean>
        </scg:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <If.Then>
        <InvokeMethod sap:VirtualizedContainerService.HintSize="218,132" mtbwt:BuildTrackingParticipant.Importance="Low" MethodName="AddRange">
          <InvokeMethod.TargetObject>
            <InArgument x:TypeArguments="scg:List(x:String)">[AssemblyInfoMetadataList]</InArgument>
          </InvokeMethod.TargetObject>
          <InArgument x:TypeArguments="s:String[]">[AssemblyInfoMetadata]</InArgument>
        </InvokeMethod>
      </If.Then>
    </If>
    <If Condition="[WriteVersionTextFile]" DisplayName="If Version Text File Creation is Requested" sap:VirtualizedContainerService.HintSize="611,1470" mtbwt:BuildTrackingParticipant.Importance="Low">
      <sap:WorkflowViewStateService.ViewState>
        <scg:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          <x:Boolean x:Key="IsPinned">False</x:Boolean>
        </scg:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <If.Then>
        <Sequence DisplayName="Process Matching Files" sap:VirtualizedContainerService.HintSize="486,1362" mtbwt:BuildTrackingParticipant.Importance="Low">
          <Sequence.Variables>
            <Variable x:TypeArguments="x:String" Name="VersionTextFileContents" />
            <Variable x:TypeArguments="x:String" Name="VersionTextFullPath" />
            <Variable x:TypeArguments="x:String" Name="variable1" />
            <Variable x:TypeArguments="x:String" Name="VersionTextFileParentFolder" />
          </Sequence.Variables>
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <If Condition="[String.IsNullOrEmpty(BinariesDirectory)]" DisplayName="Validate BinariesDirectory" sap:VirtualizedContainerService.HintSize="464,208" mtbwt:BuildTrackingParticipant.Importance="Low">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                <x:Boolean x:Key="IsPinned">False</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <If.Then>
              <Throw DisplayName="Throw ArgumentException" Exception="[New ArgumentException(&quot;Please specify a valid binaries directory to write version text file under it.&quot;, &quot;BinariesDirectory&quot;)]" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" />
            </If.Then>
          </If>
          <If Condition="[Not Directory.Exists(BinariesDirectory)]" DisplayName="Validate BinariesDirectory" sap:VirtualizedContainerService.HintSize="464,208" mtbwt:BuildTrackingParticipant.Importance="Low">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                <x:Boolean x:Key="IsPinned">False</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <If.Then>
              <mtbwa:CreateDirectory Directory="[BinariesDirectory]" DisplayName="Create Binaries Directory" sap:VirtualizedContainerService.HintSize="200,22" />
            </If.Then>
          </If>
          <Assign DisplayName="Initialize Version Text File Contents" sap:VirtualizedContainerService.HintSize="464,60" mtbwt:BuildTrackingParticipant.Importance="Low">
            <Assign.To>
              <OutArgument x:TypeArguments="x:String">[VersionTextFullPath]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:String">[Path.Combine(BinariesDirectory, VersionTextFileName)]</InArgument>
            </Assign.Value>
          </Assign>
          <Assign DisplayName="Initialize Version Text File Contents" sap:VirtualizedContainerService.HintSize="464,60" mtbwt:BuildTrackingParticipant.Importance="Low">
            <Assign.To>
              <OutArgument x:TypeArguments="x:String">[VersionTextFileParentFolder]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:String">[New FileInfo(VersionTextFullPath).DirectoryName]</InArgument>
            </Assign.Value>
          </Assign>
          <If Condition="[Not Directory.Exists(VersionTextFileParentFolder)]" DisplayName="Validate VersionTextFileParentFolder" sap:VirtualizedContainerService.HintSize="464,208" mtbwt:BuildTrackingParticipant.Importance="Low">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                <x:Boolean x:Key="IsPinned">False</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <If.Then>
              <mtbwa:CreateDirectory Directory="[VersionTextFileParentFolder]" DisplayName="Create VersionTextFile Parent Directory" sap:VirtualizedContainerService.HintSize="200,22" />
            </If.Then>
          </If>
          <mtbwa:WriteBuildMessage DisplayName="Log Version Text File Creation" sap:VirtualizedContainerService.HintSize="464,22" Importance="[BuildMessageImportance.High]" Message="[String.Format(&quot;Creating version text file: {0}.&quot;, VersionTextFullPath)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
          <Assign DisplayName="Initialize Version Text File Contents" sap:VirtualizedContainerService.HintSize="464,60" mtbwt:BuildTrackingParticipant.Importance="Low">
            <Assign.To>
              <OutArgument x:TypeArguments="x:String">[VersionTextFileContents]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:String">[String.Format("{0}={1}", BuildVersionNumber, VersionNumber)]</InArgument>
            </Assign.Value>
          </Assign>
          <InvokeMethod sap:VirtualizedContainerService.HintSize="464,132" mtbwt:BuildTrackingParticipant.Importance="Low" MethodName="WriteAllText" TargetType="si1:File">
            <InArgument x:TypeArguments="x:String">[VersionTextFullPath]</InArgument>
            <InArgument x:TypeArguments="x:String">[VersionTextFileContents]</InArgument>
          </InvokeMethod>
        </Sequence>
      </If.Then>
    </If>
    <If Condition="[AssemblyInfoMetadata.Count &gt; 0]" DisplayName="If the Assembly Metadata Dictionary Has Data" sap:VirtualizedContainerService.HintSize="611,208" mtbwt:BuildTrackingParticipant.Importance="Low">
      <sap:WorkflowViewStateService.ViewState>
        <scg:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          <x:Boolean x:Key="IsPinned">False</x:Boolean>
        </scg:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <If.Then>
        <mtbwa:WriteBuildMessage DisplayName="Found Metadata Message" sap:VirtualizedContainerService.HintSize="200,22" Importance="[BuildMessageImportance.High]" Message="[String.Format(&quot;There are {0} metadata elements specified.&quot;, AssemblyInfoMetadata.Count)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
      </If.Then>
      <If.Else>
        <mtbwa:WriteBuildMessage DisplayName="No Metadata Message" sap:VirtualizedContainerService.HintSize="200,22" Importance="[BuildMessageImportance.High]" Message="There were no metadata specified." mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
      </If.Else>
    </If>
    <ForEach x:TypeArguments="x:String" DisplayName="Enumerate Assembly Info Metadata" sap:VirtualizedContainerService.HintSize="611,254" Values="[AssemblyInfoMetadata]">
      <ActivityAction x:TypeArguments="x:String">
        <ActivityAction.Argument>
          <DelegateInArgument x:TypeArguments="x:String" Name="metadataItem" />
        </ActivityAction.Argument>
        <Sequence DisplayName="Display the Metadata Item" sap:VirtualizedContainerService.HintSize="222,146" mtbwt:BuildTrackingParticipant.Importance="Low">
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
              <x:Boolean x:Key="IsPinned">False</x:Boolean>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <mtbwa:WriteBuildMessage DisplayName="Log Update" sap:VirtualizedContainerService.HintSize="200,22" Importance="[BuildMessageImportance.High]" Message="[String.Format(&quot;Metadata Item: {0}&quot;, metadataItem)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
        </Sequence>
      </ActivityAction>
    </ForEach>
    <Assign DisplayName="Form Qualified FileSpec" sap:VirtualizedContainerService.HintSize="611,60" mtbwt:BuildTrackingParticipant.Importance="Low">
      <Assign.To>
        <OutArgument x:TypeArguments="x:String">[FileSpecToMatch]</OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="x:String">[Path.Combine(SourcesDirectory, "**", FileSpec)]</InArgument>
      </Assign.Value>
    </Assign>
    <mtbwa:FindMatchingFiles DisplayName="Find Matching Files" sap:VirtualizedContainerService.HintSize="611,22" MatchPattern="[FileSpecToMatch]" Result="[MatchingFiles]" />
    <If Condition="[MatchingFiles.Any()]" DisplayName="Handle Matching Files" sap:VirtualizedContainerService.HintSize="611,610" mtbwt:BuildTrackingParticipant.Importance="Low">
      <sap:WorkflowViewStateService.ViewState>
        <scg:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          <x:Boolean x:Key="IsPinned">False</x:Boolean>
        </scg:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <If.Then>
        <Sequence DisplayName="Process Matching Files" sap:VirtualizedContainerService.HintSize="309,502" mtbwt:BuildTrackingParticipant.Importance="Low">
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <mtbwa:WriteBuildMessage DisplayName="Log Version to Set" sap:VirtualizedContainerService.HintSize="287,22" Importance="[BuildMessageImportance.High]" Message="[String.Format(&quot;Replacing occurrences of the regular expression '{0}' with '{1}' in {2} matching source files&quot;, VersionNumberRegularExpression, VersionNumber, MatchingFiles.Count)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
          <ForEach x:TypeArguments="x:String" DisplayName="Enumerate Matching Files" sap:VirtualizedContainerService.HintSize="287,316" mtbwt:BuildTrackingParticipant.Importance="Low" Values="[MatchingFiles]">
            <ActivityAction x:TypeArguments="x:String">
              <ActivityAction.Argument>
                <DelegateInArgument x:TypeArguments="x:String" Name="path" />
              </ActivityAction.Argument>
              <Sequence DisplayName="Update Version Info in File" sap:VirtualizedContainerService.HintSize="222,208" mtbwt:BuildTrackingParticipant.Importance="Low">
                <sap:WorkflowViewStateService.ViewState>
                  <scg:Dictionary x:TypeArguments="x:String, x:Object">
                    <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                    <x:Boolean x:Key="IsPinned">False</x:Boolean>
                  </scg:Dictionary>
                </sap:WorkflowViewStateService.ViewState>
                <mtbwa:WriteBuildMessage DisplayName="Log Update" sap:VirtualizedContainerService.HintSize="200,22" Importance="[BuildMessageImportance.High]" Message="[String.Format(&quot;Updating version information in {0}&quot;, path)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                <local:ReplaceInFile AssemblyInfoMetadata="[AssemblyInfoMetadataList]" DisplayName="Update Version in File" FilePath="[path]" sap:VirtualizedContainerService.HintSize="200,22" VersionNumber="[VersionNumber]" />
              </Sequence>
            </ActivityAction>
          </ForEach>
        </Sequence>
      </If.Then>
      <If.Else>
        <mtbwa:WriteBuildWarning DisplayName="Warn No Matches Found" sap:VirtualizedContainerService.HintSize="200,22" Message="[String.Format(&quot;No version information files found matching {0}&quot;, FileSpecToMatch)]" />
      </If.Else>
    </If>
  </Sequence>
</Activity>